package org.datastructure.firstday.search;

public class seqSearch {
    public static void main(String[] args) {
        int[] arr = new int[]{1, 3, 4, 5, 6, 7, 8, 9, 11, 14, 16};
        System.out.println(queSearch(11, arr));



        System.out.println();
    }

    public static int queSearch(int val, int... arr) {
        int index = -1;
        for (int i = 0; i < arr.length; i++) {
            if (val == arr[i])
                index = i;
        }
        return index;
    }
}
